package linuxbox.status.logic;

import java.sql.Timestamp;

public class StatusObject {
    protected int m_iID = -1;         
    protected int m_iUserID = -1;         
    protected String m_sLoginID = null;
    protected String m_sFirstName = null;
    protected String m_sLastName = null;
    protected int m_iDeptID = -1;
    protected String m_sDeptName = null;
    protected Timestamp m_tsCheckIn = null;
    protected Timestamp m_tsCheckOut = null;
    protected int m_iStatus = -1;

    public StatusObject() {
    
    }

    public StatusObject(int id, int user, String login, String first, String last, 
    int dept, int status) {
        m_iID = id;
        m_iUserID = user;
        m_sLoginID = login;
        m_sFirstName = first;
        m_sLastName = last;
        m_iDeptID = dept;
        m_iStatus = status;
    }
    
    public StatusObject(int user, String login, String first, String last, 
    int dept, int status) {
        m_iUserID = user;
        m_sLoginID = login;
        m_sFirstName = first;
        m_sLastName = last;
        m_iDeptID = dept;
        m_iStatus = status;
    }

    public void copyFrom(StatusObject entry) {
        m_iID = entry.getID();
        m_iUserID = entry.getUserID();
        m_sLoginID = entry.getLoginID();
        m_sFirstName = entry.getFirstName();
        m_sLastName = entry.getLastName();
        m_iDeptID = entry.getDeptID();
        m_sDeptName = entry.getDeptName();
        m_iStatus = entry.getStatus();
        m_tsCheckIn = entry.getCheckIn();
        m_tsCheckOut = entry.getCheckOut();
    }

    public int getID() {
        return m_iID;
    }

    public void setID(int id) {
        m_iID = id;
    }

    public int getUserID() {
        return m_iUserID;
    }

    public void setUserID(int id) {
        m_iUserID = id;
    }

    public String getLoginID() {
        return m_sLoginID;
    }
    
    public void setLoginID(String str) {
        m_sLoginID = str;
    }
  
    public String getFirstName() {
        return m_sFirstName;
    }
    
    public void setFirstName(String str) {
        m_sFirstName = str;
    }
    
    public String getLastName() {
        return m_sLastName;
    }
    
    public void setLastName(String str) {
        m_sLastName = str;
    }
    
    public int getDeptID() {
        return m_iDeptID;
    }
    
    public void setDeptID(int id) {
        m_iDeptID = id;
    }
  
    public String getDeptName() {
        return m_sDeptName;
    }
    
    public void setDeptName(String str) {
        m_sDeptName = str;
    }

    public int getStatus() {
        return m_iStatus;
    }
    
    public void setStatus(int id) {
        m_iStatus = id;
    }

    public Timestamp getCheckIn() {
        return m_tsCheckIn;
    }
    
    public void setCheckIn(Timestamp ts) {
        m_tsCheckIn = ts;
    }

    public Timestamp getCheckOut() {
        return m_tsCheckOut;
    }
    
    public void setCheckOut(Timestamp ts) {
        m_tsCheckOut = ts;
    }
    
    public String dump() {
        StringBuffer sb = new StringBuffer(200);
        sb.append("id is " + m_iID + "\n");         
        sb.append("userid is " + m_iUserID + "\n");         
        sb.append("loginid is " + m_sLoginID + "\n");
        sb.append("firstname is " + m_sFirstName + "\n");
        sb.append("lastname is " + m_sLastName + "\n");
        sb.append("deptid is " + m_iDeptID + "\n");
        sb.append("deptname is " + m_sDeptName + "\n");
        sb.append("checkin is " + m_tsCheckIn + "\n");
        sb.append("checkout is " + m_tsCheckOut + "\n");
        sb.append("status is " + m_iStatus + "\n");
        return sb.toString();
    }
}
